<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of WebFunction
 *
 * @author t0255
 */
class WebFunction {
    public static function getModuleName($file_path){
        $module_start = strpos($file_path,ServerFunction::getWebRoot())+strlen(ServerFunction::getWebRoot())+1;
        //從module_start之後找第一個「/」的位置
        $module_end = strpos($file_path,"/",$module_start);

        return substr($file_path,$module_start,$module_end-$module_start);
    }
}
?>
